import java.util.Random;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int[] balls = new int[7];
        int[] players = new int[7];
        Scanner in = new Scanner(System.in);
        Random r = new Random();
        System.out.println("亲输入你的双色球号码:");
        for(int j = 0;j< players.length;j++){
            if(j!=6){
                System.out.println("红球:");
                players[j] = in.nextInt();
            }else{
                System.out.println("蓝球:");
                players[j] = in.nextInt();
            }
        }
        for(int i = 0;i< balls.length;i++){
            if(i!=6){
                balls[i] = r.nextInt(33)+1;
            }else{
                balls[i] = r.nextInt(16)+1;
            }
        }
        System.out.println("开球！");
        for(int k = 0;k< balls.length;k++){
            System.out.print(balls[k]+"\t");
        }
        int[] goal = judge(balls,players);
        if(goal[1] == 1){

        }
    }
    public static int[] judge (int[] arr1,int[] arr2){
        int number_red = 0;
        for(int i = 0;i<arr1.length - 1;i++){
            for(int j = 0;j< arr2.length - 1;j++){
                if(arr1[i] == arr2[j]){
                    number_red++;
                }
            }
        }
        int number_blue = 0;
        if(arr1[arr1.length-1] ==arr2[arr2.length-1]){
            number_blue++;
        }
        return new int[]{number_red, number_blue};
    }
}